package com.codechuan.demo;

import android.app.Application;
import android.os.Build;

import com.codechuan.demo.common.Constant;
import com.codechuan.demo.utils.ContextUtils;
import com.example.libbaiduselectlocation.MySelectLocationBDSDKManager;

import java.text.SimpleDateFormat;

import me.jessyan.autosize.AutoSize;
import me.jessyan.autosize.AutoSizeConfig;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        ContextUtils.application = this;
        // 以 375dp 为设计宽度进行适配
        AutoSizeConfig.getInstance().setDesignWidthInDp(375);
        AutoSize.initCompatMultiProcess(this);
        // 实时定位初始化
        MySelectLocationBDSDKManager.INSTANCE.init(this);
        Constant.format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Constant.model = Build.BRAND ;
        Constant.phone_version = Build.VERSION.RELEASE;
    }
}